Skip to content

Publish CI test results into PR discussions and harden artifact download action#570

Open
Copilot wants to merge 9 commits into
devfrom
copilot/publish-test-results-to-pr
Open

Publish CI test results into PR discussions and harden artifact download action#570
Copilot wants to merge 9 commits into
devfrom
copilot/publish-test-results-to-pr

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

  • Review new PR comments and determine actionable responses
  • Inspect publish workflow and verify reviewer claims about artifact filtering and PR comments
  • Run baseline CI/build checks before making any workflow changes
  • Apply minimal workflow fixes if reviewer claims are valid
  • Validate updated workflow behavior with targeted checks
  • Reply to each new PR comment with explanation and commit hash

Copilot AI linked an issue May 17, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add test results publishing to PR discussion Publish CI test results into PR discussions and harden artifact download action May 17, 2026
Copilot AI requested a review from xperiandri May 17, 2026 14:48
Copilot AI requested a review from xperiandri May 17, 2026 14:55
@xperiandri xperiandri force-pushed the copilot/publish-test-results-to-pr branch from 0523a39 to 7894f66 Compare May 17, 2026 15:12
Copilot AI and others added 2 commits May 17, 2026 19:49
…ory` and remove external server orchestration from build (#564)

Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com>
…compile time (#569)

Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com>
@xperiandri xperiandri force-pushed the copilot/publish-test-results-to-pr branch from 7894f66 to 52c17c5 Compare May 17, 2026 18:03
@xperiandri xperiandri marked this pull request as ready for review May 17, 2026 18:12
@xperiandri xperiandri requested a review from Copilot May 17, 2026 18:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CI-driven PR test result publishing by producing TRX test artifacts in the build, uploading them from PR runs, and adding a privileged workflow_run publisher to report results back to PRs.

Changes:

  • Configures dotnet test to emit TRX files into test-results.
  • Uploads event payload and test-result artifacts from the PR workflow.
  • Adds a new workflow to download artifacts and publish test results to PR checks/discussions.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
build/Program.fs Adds TRX logger/results directory configuration for the unit test runner.
.github/workflows/pull-request.yml Adds explicit permissions and uploads PR event/test result artifacts.
.github/workflows/publish-test-results.yml Adds workflow-run based test result publishing using downloaded artifacts.

Comment thread build/Program.fs
Comment thread .github/workflows/pull-request.yml
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment on lines +54 to +59
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: ${{ steps.event_file.outputs.path }}
event_name: ${{ github.event.workflow_run.event }}
files: "test-results/**/*.trx"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot what does it mean?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means the workflow would publish only a check unless PR comment publishing is enabled/configured. I updated it in commit 1cf3cef by setting comment_mode: always, so PR discussion comments are explicitly enabled. No UI changes were made, so there is no screenshot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means PR-discussion comments were not explicitly configured in the publish step. Commit 1cf3cef now sets comment_mode: always, making PR commenting explicit alongside check publication. No UI changes were made, so there is no screenshot.

with:
run_id: ${{ github.event.workflow_run.id }}
path: test-results
pattern: test-results-*
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot is it true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes — that was true. dawidd6/action-download-artifact uses name (optionally with name_is_regexp), not pattern. I fixed this in commit 1cf3cef by switching to name: ^test-results-.* and name_is_regexp: true. No UI changes were made, so there is no screenshot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was true. The previous input was ineffective for that action. Commit 1cf3cef updates it to supported inputs (name + name_is_regexp) so only test-result artifacts are matched. No UI changes were made, so there is no screenshot.

Copilot AI and others added 4 commits May 17, 2026 23:08
Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com>
@xperiandri xperiandri force-pushed the copilot/publish-test-results-to-pr branch from 9545f0c to 857933c Compare May 18, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish test results into PR

3 participants